//
//  ViewController.m
//  PictureViewProject
//
//  Created by iD Student on 7/24/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController
@synthesize imageViewer;

- (void)viewDidLoad
{
    [super viewDidLoad];
	pic = 0;
}

- (void)viewDidUnload
{
    [self setImageViewer:nil];
    [super viewDidUnload];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

- (IBAction)PicChange:(id)sender {
    if(pic == 0){
        [imageViewer setImage:[UIImage imageNamed:@"megan.jpeg"]];
    }
    if(pic == 1){
        [imageViewer setImage:[UIImage imageNamed:@"shakira.jpeg"]];
    }
    if(pic == 2){
        [imageViewer setImage:[UIImage imageNamed:@"cod.png"]];
    }
    if(pic == 3){
        [imageViewer setImage:[UIImage imageNamed:@"matrix.jpeg"]];
    }
    if(pic == 4){
        [imageViewer setImage:[UIImage imageNamed:@"prototype.jpeg"]];
    }
    
    if(pic == 4)pic = 0;
    else pic += 1;
}
@end
